<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Application_Models_DetallePersonaModel {

    private $_id;
    private $_names;
    private $_lastName;
    private $_dni;
    private $_address;
    private $_fijo;
    private $_movil;
    private $_fb_id;

    public function get_id() {
        return $this->_id;
    }

    public function set_id($_id) {
        $this->_id = $_id;
    }

    public function get_names() {
        return $this->_names;
    }

    public function set_names($_names) {
        $this->_names = $_names;
    }

    public function get_lastName() {
        return $this->_lastName;
    }

    public function set_lastName($_lastName) {
        $this->_lastName = $_lastName;
    }

    public function get_dni() {
        return $this->_dni;
    }

    public function set_dni($_dni) {
        $this->_dni = $_dni;
    }

    public function get_address() {
        return $this->_address;
    }

    public function set_address($_address) {
        $this->_address = $_address;
    }

    public function get_fijo() {
        return $this->_fijo;
    }

    public function set_fijo($_fijo) {
        $this->_fijo = $_fijo;
    }

    public function get_movil() {
        return $this->_movil;
    }

    public function set_movil($_movil) {
        $this->_movil = $_movil;
    }

    public function get_fb_id() {
        return $this->_fb_id;
    }

    public function set_fb_id($_fb_id) {
        $this->_fb_id = $_fb_id;
    }

    public function registerPerson() {
        $_REQUEST['fb_id'] = 1;

        $db = new
                SuperDataBase();
        $this->_names = $_POST['namePerson'];
        $this->_dni = $_POST['dni'];
        $this->_lastName = $_POST['lastName'];
        $this->_address = $_POST['address'];
        $this->_fijo = $_POST['phone'];

        $this->_fb_id = $_REQUEST['fb_id'];
        $this->_movil = $_REQUEST['movil'];

        $query = "call sp_register_persona('$this->_names','$this->_lastName', ' $this->_dni', '$this->_address', '$this->_fijo', '$this->_movil','$this->_fb_id',$message);";
        $db->executeQuery($query);
        return $message;
    }

}

?>
